package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.LumiereCloverPayLogMapper;
import org.linlinjava.litemall.db.domain.LumiereCloverPayLog;
import org.linlinjava.litemall.db.domain.LumiereCloverPayLogExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class LumiereCloverPayLogService {

    @Resource
    private LumiereCloverPayLogMapper lumiereCloverPayLogMapper;

    public void add(LumiereCloverPayLog log){
        lumiereCloverPayLogMapper.insert(log);
    }

    public LumiereCloverPayLog queryByOrderId(String externalId){
        LumiereCloverPayLogExample example = new LumiereCloverPayLogExample();
        LumiereCloverPayLogExample.Criteria criteria = example.createCriteria();
        criteria.andExternalIdEqualTo(externalId);
        return lumiereCloverPayLogMapper.selectOneByExample(example);
    }
}
